using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpatialAnalystTools._Extraction
{
    /// <summary>
    /// <para>Extract by Circle</para>
    /// <para>Extracts the cells of a raster based on a circle by specifying the circle's center and radius.</para>
    /// <para>通过指定圆的中心和半径来提取基于圆的栅格的像元。</para>
    /// </summary>    
    [DisplayName("Extract by Circle")]
    public class ExtractByCircle : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ExtractByCircle()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input raster from which cells will be extracted.</para>
        /// <para>将从中提取像元的输入栅格。</para>
        /// </param>
        /// <param name="_center_point">
        /// <para>Center point</para>
        /// <para><xdoc>
        ///   <para>Center coordinate (x,y) of circle defining the area to be extracted.</para>
        ///   <para>The coordinates are specified in the same map units as the input raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义要提取区域的圆的中心坐标 （x，y）。</para>
        ///   <para>坐标的指定方式与输入栅格的地图单位相同。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_radius">
        /// <para>Radius</para>
        /// <para><xdoc>
        ///   <para>Radius of the circle defining the area to be extracted.</para>
        ///   <para>The radius is specified in map units and is in the same units as the input raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义要提取的区域的圆的半径。</para>
        ///   <para>半径以地图单位指定，并且采用与输入栅格相同的单位。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para>The output raster containing the cell values extracted from the input raster.</para>
        /// <para>包含从输入栅格中提取的像元值的输出栅格。</para>
        /// </param>
        public ExtractByCircle(object _in_raster, object _center_point, double? _radius, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._center_point = _center_point;
            this._radius = _radius;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "Spatial Analyst Tools";

        public override string ToolName => "Extract by Circle";

        public override string CallName => "sa.ExtractByCircle";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _center_point, _radius, _out_raster, _extraction_area.GetGPValue()];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input raster from which cells will be extracted.</para>
        /// <para>将从中提取像元的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Center point</para>
        /// <para><xdoc>
        ///   <para>Center coordinate (x,y) of circle defining the area to be extracted.</para>
        ///   <para>The coordinates are specified in the same map units as the input raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义要提取区域的圆的中心坐标 （x，y）。</para>
        ///   <para>坐标的指定方式与输入栅格的地图单位相同。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Center point")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _center_point { get; set; }


        /// <summary>
        /// <para>Radius</para>
        /// <para><xdoc>
        ///   <para>Radius of the circle defining the area to be extracted.</para>
        ///   <para>The radius is specified in map units and is in the same units as the input raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义要提取的区域的圆的半径。</para>
        ///   <para>半径以地图单位指定，并且采用与输入栅格相同的单位。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Radius")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _radius { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster containing the cell values extracted from the input raster.</para>
        /// <para>包含从输入栅格中提取的像元值的输出栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Extraction area</para>
        /// <para><xdoc>
        ///   <para>Identifies whether to extract cells inside or outside the input circle.</para>
        ///   <bulletList>
        ///     <bullet_item>Inside—A keyword specifying that the cells inside the input circle should be selected and written to the output raster. All cells outside the circle will receive NoData values on the output raster.</bullet_item><para/>
        ///     <bullet_item>Outside—A keyword specifying that the cells outside the input circle should be selected and written to the output raster. All cells inside the circle will receive NoData values on the output raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>标识是在输入圆圈内还是外提取单元格。</para>
        ///   <bulletList>
        ///     <bullet_item>内部 - 指定应选择输入圆内的像元并将其写入输出栅格的关键字。圆圈外的所有像元都将在输出栅格上接收 NoData 值。</bullet_item><para/>
        ///     <bullet_item>外部 - 指定应选择输入圆外的像元并将其写入输出栅格的关键字。圆圈内的所有像元都将在输出栅格上接收 NoData 值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extraction area")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _extraction_area_value _extraction_area { get; set; } = _extraction_area_value._INSIDE;

        public enum _extraction_area_value
        {
            /// <summary>
            /// <para>Inside</para>
            /// <para>Inside—A keyword specifying that the cells inside the input circle should be selected and written to the output raster. All cells outside the circle will receive NoData values on the output raster.</para>
            /// <para>内部 - 指定应选择输入圆内的像元并将其写入输出栅格的关键字。圆圈外的所有像元都将在输出栅格上接收 NoData 值。</para>
            /// </summary>
            [Description("Inside")]
            [GPEnumValue("INSIDE")]
            _INSIDE,

            /// <summary>
            /// <para>Outside</para>
            /// <para>Outside—A keyword specifying that the cells outside the input circle should be selected and written to the output raster. All cells inside the circle will receive NoData values on the output raster.</para>
            /// <para>外部 - 指定应选择输入圆外的像元并将其写入输出栅格的关键字。圆圈内的所有像元都将在输出栅格上接收 NoData 值。</para>
            /// </summary>
            [Description("Outside")]
            [GPEnumValue("OUTSIDE")]
            _OUTSIDE,

        }

        public ExtractByCircle SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}